//
//  TerminalWindow.h
//  iTerm
//
//  Created by Steve Gehrman on Fri Aug 15 2003.
//  Copyright (c) 2003 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@class PSMTabBarControl, TerminalWindowSession, Bookmark;

@interface TerminalWindow : NSWindowController
{    
    IBOutlet    NSTabView           *_tabView;
    IBOutlet    NSToolbar           *_toolbar;
    IBOutlet    PSMTabBarControl    *_tabBar;
	
    //ITTerminal*					_terminal;
	TerminalWindowSession*			_currentSession;
	NSMutableArray *				_sessions; 
	int								_identifier;
}

- (TerminalWindowSession*) createTab:(Bookmark *)bookmark;
- (TerminalWindowSession *) currentSession;
- (TerminalWindowSession *) findSessionFromTabViewItem:(NSTabViewItem*)tabViewItem;
- (void)closeAllSessions;
- (BOOL)validateMenuItem:(NSMenuItem *)item;

- (IBAction)newTab:(id)sender;
- (IBAction)closeTab:(id)sender;
- (IBAction)close:(id)sender;
- (IBAction)showBookmarks:(id)sender;

-(BOOL)windowShouldClose:(id)window;

- (BOOL)tabView:(NSTabView *)aTabView shouldCloseTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabView:(NSTabView *)aTabView willCloseTabViewItem:(NSTabViewItem *)tabViewItem;
- (void)tabView:(NSTabView *)aTabView didCloseTabViewItem:(NSTabViewItem *)tabViewItem;


@end
